package com.taotao.rest.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.taotao.common.bean.TaotaoResult;
import com.taotao.rest.service.RedisServer;

@Controller
@RequestMapping("/cache/sync")
@ResponseBody
public class RedisController {

	@Autowired
	private RedisServer redisServer;
	
	/**
	 * 同步内容缓存逻辑
	 */
	@RequestMapping("/content/{contentCid}")
	public TaotaoResult syncContent(@PathVariable long contentCid) {
		TaotaoResult result = redisServer.syncContent(contentCid);
		return result;
		
	}
}
